<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Vue测试</title>
  <style>
    .page{
      width: 100px;
      height: 100px;
      border: 1px solid #00BFFF;
      background-color: #00B7FF;
    }
    .active{
      background-color: #CCCCCC;
    }
  </style>
  <script src="../js/vue.js"></script>
</head>

<body>
  <div id="app">
    <div class="page" :class="{active:isTrue}"></div>
  </div>
  <script type="text/javascript">
    var app = new Vue({
      el: '#app',
      data: {
          isTrue:true
      }
    })
  </script>
</body>

</html>